▍ humdrum codex / glint v1.0.2
license AGPL-3.0
1.0 KB raw
id
TASK-032
title
Memoize editor visual model — fix scroll/open lag
status
🏁 Done
assignee
created_date
2026-06-30 20:44
updated_date
2026-06-30 20:44
labels
bug, performance
dependencies
priority
high
ordinal
31000

Description

buildVisual() rescanned+rewrapped+restyled the whole document on every View, cursor move, and scroll tick (no caching). Per single scroll row: 20ms/62MB at 500 lines, 133ms/345MB at 2000 lines w/ spell. Caused open-doc lag and scroll stutter. Fix: memoize the scan+wrap model (e.visual []vrow), invalidate only on scan/wrap input changes (Lines/Width/theme/spell/codeFile). Scroll/render now O(visible) ~0.4ms, independent of doc size.

Acceptance Criteria